import request from '@/utils/request'

const URL = 'op/room-type'

export function addRoomType(form) {
  return request({
    url: URL + '/add',
    method: 'post',
    data: form
  })
}

export function editRoomType(form) {
  return request({
    url: URL + '/update',
    method: 'post',
    data: form
  })
}

export function delRoomsType(typeIds) {
  return request({
    url: URL + '/delete',
    method: 'delete',
    params: {
      typeIds: typeIds
    }
  })
}

export function getRoomTypeById(typeId) {
  return request({
    url: URL + '/' + typeId,
    method: 'post',
    data: {
    }
  })
}

export function getAllRoomTypeList(params) {
  return request({
    url: URL + '/list',
    method: 'post',
    data: {
      ...params
    }
  })
}

export function getAllRoomType() {
  return request({
    url: URL,
    method: 'post',
    data: {}
  })
}
